<div class="row">
	<div class="col-md-12 clearfix"> 
		<h2>Registration Form</h2>
    </div>
</div>




<?php 
$attributes = array('class' => 'inline', 'role' => 'form');
echo form_open('registration', $attributes) ?>
	
    <!-- hidden: promotion name, facebook id, vendor url -->
    
    <input type="hidden" name="facebook" value="" /> 

	<div class="row">
        <div class="col-xs-12 col-md-6"> 
        	
            <?php if(validation_errors() != false): ?>
            <div class="alert alert-danger">
                <ul>
                <?php echo validation_errors(); ?>
                </ul>
            </div>
            <?php endif; ?>
        
            <div class="form-group clearfix <?= form_error('first_name') ? 'has-error' : 'has-success has-feedback' ?>">
                <label for="first_name" class="col-xs-12 col-md-3 control-label">First Name</label>
                <div class="col-xs-12 col-md-9">
                	<input class="form-control" type="text" name="first_name" placeholder="Enter first name" value="<?php echo set_value('first_name'); ?>" size="50" /> 
                </div>
            </div>
            
            <div class="form-group clearfix <?= form_error('last_name') ? 'has-error' : 'has-success has-feedback' ?>">
                <label for="last_name" class="col-xs-12 col-md-3 control-label">Last Name</label>
                <div class="col-xs-12 col-md-9">
                	<input class="form-control" type="text" name="last_name" placeholder="Enter last name" value="<?php echo set_value('last_name'); ?>" size="50" /> 
                </div>
            </div>
            
            <div class="form-group clearfix <?= form_error('gender') ? 'has-error' : 'has-success has-feedback' ?>">
                <label for="gender" class="col-xs-12 col-md-3 control-label">Gender</label>
                
                <div class="col-xs-12 col-md-9">
                    <div class="col-xs-6 col-md-6">
                        <input type="radio" name="gender" value="M" <?php echo set_radio('gender', 'M'); ?> /><span> Male</span>
                    </div>
                    <div class="col-xs-6 col-md-6">
                        <input type="radio" name="gender" value="F" <?php echo set_radio('gender', 'F'); ?> /><span> Female</span>
                    </div>
                </div>
            </div>
            
            <div class="form-group clearfix <?= form_error('email') ? 'has-error' : 'has-success has-feedback' ?>">
                <label for="email" class="col-xs-12 col-md-3 control-label">Email</label>
                <div class="col-xs-12 col-md-9">
                	<div class="input-group">
                        <span class="input-group-addon">@</span>
                        <input class="form-control" type="text" name="email" placeholder="Enter your email" value="<?php echo set_value('email'); ?>" size="50" /> 
                    </div>
                </div>
            </div>
            
            
            <div class="form-group clearfix <?= form_error('phone') ? 'has-error' : 'has-success has-feedback' ?>">
                <label for="phone" class="col-xs-12 col-md-3 control-label">Phone</label>
                <div class="col-xs-12 col-md-9">
                	<div class="input-group">
                        <span class="input-group-addon"><span class="glyphicon glyphicon-earphone"></span></span>
                        <input class="form-control" type="text" name="phone" placeholder="Enter your phone number" value="<?php echo set_value('phone'); ?>" size="50" /> 
                    </div>
                </div>
            </div>
            
            <div class="form-group clearfix <?= form_error('address') ? 'has-error' : 'has-success has-feedback' ?>">
                <label for="address" class="col-xs-12 col-md-3 control-label">Address</label>
                <div class="col-xs-12 col-md-9">
                	<input class="form-control" type="text" name="address" placeholder="Enter your address" value="<?php echo set_value('address'); ?>" size="50" /> 
                </div>
            </div>
            
            <div class="form-group clearfix <?= form_error('city') ? 'has-error' : 'has-success has-feedback' ?>">
                <label for="city" class="col-xs-12 col-md-3 control-label">City</label>
                <div class="col-xs-12 col-md-9">
                	<input class="form-control" type="text" name="city" placeholder="Enter your city" value="<?php echo set_value('city'); ?>" size="50" /> 
                </div>
            </div>
            
            <div class="form-group clearfix <?= form_error('state') ? 'has-error' : 'has-success has-feedback' ?>">
                <label for="state" class="col-xs-6 col-md-3 control-label">State</label>
                <div class="col-xs-12 col-md-9">
                	<input class="form-control" type="text" name="state" placeholder="Select your state" value="<?php echo set_value('state'); ?>" size="50" /> 
                </div>
            </div>
            
            <div class="form-group clearfix <?= form_error('zip_code') ? 'has-error' : 'has-success has-feedback' ?>">
                <label for="zip_code" class="col-xs-6 col-md-3 control-label">Zip Code</label>
                <div class="col-xs-12 col-md-9">
                	<input class="form-control" type="text" name="zip_code" placeholder="Enter your zip code" value="<?php echo set_value('zip_code'); ?>" size="50" /> 
                </div>
            </div>
            
            
            <div class="form-group clearfix <?= form_error('state') ? 'has-error' : 'has-feedback' ?>"> 
            	<div class="col-md-12">
                    <label for="terms">
                        <input type="checkbox" name="terms" value="1" <?php echo set_checkbox('terms', '1'); ?> />
                        I read and accept the <a href="<?php echo base_url(); ?>terms">Terms and Conditions</a>
                    </label>
                </div>
            </div>
            
            <div class="form-group clearfix"> 
            	<div class="col-md-12">
                    <label for="optin">
                        <input type="checkbox" name="optin" value="1" <?php echo set_checkbox('optin', '1'); ?> />
                        I want to be contacted for future promotions from [TBD]
                    </label>
                </div>
            </div>
            
            
            <div class="form-group clearfix"> 
            	<div class="col-md-12">
            		<?= recaptcha() ?>
                </div>
            </div>
          
            <div class="form-group clearfix"> 
            	<div class="col-md-12">
            		<input class="btn btn-default" name="register-submit" type="submit" value="REGISTER" />
                </div>
            </div>
             
        </div><!-- form ends -->
        
        <div class="col-xs-12 col-md-6">
        	<div class="clearfix">
    			<img src="http://placehold.it/720x720" width="100%">
            </div>
        </div>
        
    </div>
	
    <!--
	<label for="message">Message</label>
	<textarea name="message"></textarea><br />

	<input type="submit" name="submit" value="Submit" />
    -->

</form>